#ifndef WRITEATTACK_TARGETDLG_H
#define WRITEATTACK_TARGETDLG_H

#include <vector>

#include <QtWidgets/QMainWindow>
#include <QtCore/QTimer>

#include "ui_DlgTargets.h"

class TargetWordsDialog;

// TODO: this is hacky crap make a custom 
// widget for these guys.
class MascotButton : public QPushButton
{
	Q_OBJECT

public:
	MascotButton( QWidget *parent, int buttonIndex ) :
	QPushButton(parent), m_btnIndex( buttonIndex ), m_ownerDlg( NULL) {}	

	QIcon m_selIcon;
	QIcon m_unselIcon;
	int m_btnIndex;
	TargetWordsDialog *m_ownerDlg;

public slots:
	void activate();
};


class TargetWordsDialog : public QDialog, private Ui_TargetWordsDialog
{
	Q_OBJECT
	
public:
	TargetWordsDialog( QWidget *parent = NULL, int wordCount=200, int timeLimit=5 );

	int getWordCount();
	int getTimeLimit();

	void getCurrentMascot( int &index, char *name );
	void mascot( int mascotIndex );

protected:
	int currMascot;
	QString currMascotName;

	static const char *mascotName[12];

	std::vector<MascotButton*> m_mascotBtn;	

public slots:
	void presetNanowrimo();

	void suggestTimeLimit();
	void suggestWordCount();

	void timeLimitDial( int dialval );
	void targetWordsDial( int dialval );
	
};


#endif

		
